package com.hbwxz.compareprice;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 商品比价实体
 *
 * @author shenzw
 * @date 2023/12/18
 */
@Data
@Builder
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class PriceResult {

    /**
     * 平台价
     */
    private int price;

    /**
     * 优惠价
     */
    private int discount;

    /**
     * 最终价（平台价 - 优惠价）
     */
    private int realPrice;

    /**
     * 平台
     */
    private String platform;

    public PriceResult(String platform) {
        this.platform = platform;
    }

    @Override
    public String toString() {
        return "PriceResult{" +
                "平台='" + platform + '\'' +
                ", 平台价=" + price +
                ", 优惠价=" + discount +
                ", 最终价=" + realPrice +
                '}';
    }
}
